package com.ytc.service;

import com.ytc.model.Letter;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("service-provider")
public interface LetterService {
    //柴晓颖：站内未读短信查询
    @RequestMapping("queryUnreadLetter")
    List<Letter> queryUnreadLetter(@RequestParam("uId") Integer uId);

    //柴晓颖：修改站内短信阅读状态（已读）
    @RequestMapping("updateLstatusRead")
    void updateLstatusRead(@RequestParam("lId") Integer lId);

    //柴晓颖：站内已读短信查询
    @RequestMapping("queryReadLetter")
    List<Letter> queryReadLetter(@RequestParam("uId") Integer uId);

    //柴晓颖：作者发送站内短信
    @RequestMapping("authorSendLetter")
    void authorSendLetter(@RequestBody Letter letter);

}
